package com.gobrs.async.test.inteceptor;

import com.gobrs.async.core.callback.AsyncTaskExceptionInterceptor;
import com.gobrs.async.core.callback.ErrorCallback;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class GobrsInterceptor implements AsyncTaskExceptionInterceptor {

    @SneakyThrows
    @Override
    public void exception(ErrorCallback errorCallback) {
        log.error("Execute global interceptor  error", errorCallback.getThrowable());
    }

}
